<template>
  <div class="expert-container">
    <!-- 背景装饰元素 -->
    <div class="background-shapes">
      <div class="shape shape-1"></div>
      <div class="shape shape-2"></div>
      <div class="shape shape-3"></div>
      <div class="shape shape-4"></div>
    </div>
    
    <!-- 主内容卡片 -->
    <div class="welcome-card">
      <div class="card-header">
        <div class="logo-icon">
          <svg viewBox="0 0 24 24" fill="currentColor">
            <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/>
          </svg>
        </div>
      </div>
      
      <div class="welcome-message">
        <h1>欢迎您，<span class="expert-name">{{ expertName || '专家' }}</span></h1>
        <p class="subtext">感谢您对每一个农户的帮助</p>
      </div>
      
      <div class="card-footer">
        <div class="status-indicator">
          <span class="status-text">农业是立国之本，科技是兴农之路。<br>
            用专业知识服务三农，用智慧技术振兴乡村。</span>
        </div>
      </div>
    </div>
    
    <!-- 页脚信息 -->
    <footer class="page-footer">
      <p>© {{ new Date().getFullYear() }} 专家系统平台 | 版本 1.0.0</p>
    </footer>
  </div>
</template>

<script setup>
// 接收后端传递的专家姓名参数
defineProps({
  expertName: {
    type: String,
    default: ''
  }
})

// 定义组件名称
defineOptions({
  name: 'ExpertWelcomePage'
})
</script>

<style scoped>
/* 基础样式设置 */
.expert-container {
  min-height: 100vh;
  width: 100%;
  background-color: #f0f7ff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
}

/* 背景装饰形状 */
.background-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.shape {
  position: absolute;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.05));
  border-radius: 50%;
  filter: blur(80px);
}

.shape-1 {
  width: 600px;
  height: 600px;
  top: -300px;
  left: -100px;
}

.shape-2 {
  width: 500px;
  height: 500px;
  bottom: -200px;
  right: -100px;
  background: linear-gradient(135deg, rgba(41, 128, 185, 0.1), rgba(52, 152, 219, 0.05));
}

.shape-3 {
  width: 300px;
  height: 300px;
  top: 20%;
  right: 10%;
}

.shape-4 {
  width: 250px;
  height: 250px;
  bottom: 30%;
  left: 15%;
}

/* 欢迎卡片样式 */
.welcome-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 600px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.welcome-card:hover {
  transform: translateY(-5px);
}

/* 卡片头部图标 */
.card-header {
  margin-bottom: 30px;
}

.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  color: #2980b9;
  background-color: #ebf5fb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 4px 15px rgba(41, 128, 185, 0.15);
}

/* 欢迎信息样式 */
.welcome-message h1 {
  font-size: 2.2rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.expert-name {
  color: #2980b9;
  position: relative;
}

.expert-name::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(41, 128, 185, 0.2);
  border-radius: 3px;
}

.subtext {
  color: #7f8c8d;
  font-size: 1.1rem;
  margin: 0;
  padding-top: 10px;
}

/* 卡片底部状态指示 */
.card-footer {
  margin-top: 40px;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #27ae60;
  font-size: 0.95rem;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #27ae60;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* 页脚样式 */
.page-footer {
  position: relative;
  z-index: 2;
  margin-top: 50px;
  color: #95a5a6;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .welcome-card {
    padding: 30px 20px;
  }
  
  .welcome-message h1 {
    font-size: 1.8rem;
  }
  
  .subtext {
    font-size: 1rem;
  }
  
  .logo-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
}
</style>